import { Operation } from '../operations'
import Editor from '../editor'
export function toUpperCasePlugin (editor: Editor): Editor {
    const apply = editor.apply.bind(editor)
    editor.apply = (operation: Operation) => {
        const spacers = operation.getSpacers().toUpperCase()
        operation.setSpacers(spacers)
        apply(operation)
    }
    return editor
}